home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 26 (Anniversary Edition)
/
Volume 26 [Anniversary Edition] - JOGO DISK .iso
/
DEPOSITO
/
sb_bust.swf
/
scripts
/
__Packages
/
Enemy3Obj.as
< prev
next >
Wrap
Text File
|
2006-07-26
|
2KB
|
71 lines
class Enemy3Obj extends Enemy1Obj
{
function Enemy3Obj(l_RefMov)
{
super(l_RefMov);
this.ComboNow = new Array(35);
this.Combos = new Array();
this.Combos.push(["PunchR",["Wait",20,20]]);
this.Combos.push(["PunchL",["Wait",20,20]]);
this.Combos.push(["PunchR",["Wait",20,20]]);
this.Combos.push(["PunchL",["Wait",20,20]]);
this.Combos.push(["SA",["Wait",25,25]]);
this.MaxHealth = 100;
this.Health = 100;
this.ChanceToParry = 90;
this.MaxNbParry = 2;
this.PunchRDammage = 5;
this.PunchLDammage = 5;
this.SADammage = 20;
this.BounceDammage = 20;
}
function StartBounce()
{
if(this.RefMov.State._currentframe >= this.RefMov.State._totalframes)
{
this.State = "BouncePt1";
}
}
function BouncePt1()
{
if(this.RefMov.State._currentframe >= this.RefMov.State._totalframes)
{
this.CheckHit();
this.State = "BouncePt2";
}
}
function BouncePt2()
{
if(this.RefMov.State._currentframe >= this.RefMov.State._totalframes)
{
this.CheckHit();
this.State = "BouncePt3";
}
}
function BouncePt3()
{
if(this.RefMov.State._currentframe >= this.RefMov.State._totalframes)
{
this.ReturnIdle();
}
}
function CheckHit()
{
if(_global.C.Player.CanBeHit or this.State == "BouncePt2" and (_global.C.Player.State == "ParryL" or _global.C.Player.State == "EndParryL" or _global.C.Player.State == "StartParryL"))
{
_global.C.Player.SetGetHit(this[this.ActionNow + "Dammage"]);
}
else if((_global.C.Player.ActionNow == "ParryR" or _global.C.Player.ActionNow == "ParryL") and _global.C.Player.AvoidAttack == "")
{
_global.C.Player.AvoidAttack = this.ActionNow;
_global.C.Player.PtSA += _global.C.Player.NbPtSAWin;
_global.C.Player.HaveParry = true;
if(_global.C.Player.PtSA > 100)
{
_global.C.Player.PtSA = 100;
}
_global.C._parent.Interface.PlayerSA.gotoAndStop(_global.C.Player.PtSA + 1);
}
}
}